home *** CD-ROM | disk | FTP | other *** search
/ Internet Publisher's Toolbox 2.0 / Internet Publisher's Toolbox.iso / internet / ntserver / wtsource / list.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-08  |  1.5 KB  |  70 lines

  1. /* WIDE AREA INFORMATION SERVER SOFTWARE
  2.    No guarantees or restrictions.  See the readme file for the full standard
  3.    disclaimer.    
  4.    Brewster@think.com
  5. */
  6.  
  7. /* Copyright (c) CNIDR (see ../COPYRIGHT) */
  8.  
  9.  
  10. /* list utilities */
  11. #ifndef LIST_H
  12. #define LIST_H
  13.  
  14. #include "cutil.h" /* for boolean */
  15.  
  16. #ifdef __cplusplus
  17. /* declare these as C style functions */
  18. extern "C"
  19.     {
  20. #endif /* def __cplusplus */
  21.  
  22. void* car _AP((void **list));
  23.  
  24. void* first _AP((void **list));
  25.  
  26. void* second _AP((void **list));
  27.  
  28. void* last _AP((void **list));
  29.  
  30. void** cdr _AP((void **list));
  31.  
  32. void** nth_cdr _AP((void **list,long n));
  33.  
  34. void** rest _AP((void **list));
  35.  
  36. void* cadr _AP((void **list));
  37.  
  38. void* nth _AP((long number, void **list));
  39.  
  40. void setf_nth _AP((long number,void* elem,void**list));
  41.  
  42. /* length of a list.  returns -1 if error.*/
  43. long length _AP((void **list));
  44.  
  45. #ifdef WIN32
  46. void mapcar _AP((void **list, void (*function) (void* argument)));
  47. #else
  48. void mapcar _AP((void **list, void function (void* argument)));
  49. #endif
  50.  
  51. /* pushes the item on the end of the list. returns the list. */
  52. void **collecting _AP((void **list, void *item));
  53.  
  54. void setf_car _AP((void** list, void* item));
  55.  
  56. boolean null _AP((void **list));
  57.  
  58. boolean free_list _AP((void **list));
  59.  
  60. void sort_list _AP((void** list,int (*cmp)(const void* arg1,const void* arg2)));
  61.  
  62. void** remove_item_from_list _AP((void** list,long pos));
  63.  
  64. #ifdef __cplusplus
  65.     }
  66. #endif /* def __cplusplus */
  67.  
  68.  
  69. #endif /* ndef LIST_H */
  70.